<template>
  <div class="top">
    <img src="../assets/img/arrow-right-black.png" alt="" />
    <span>我的收获地址</span>
  </div>
  <div class="middle">
    <ul v-for="item in list" :key="item">
      <li>
        <div>
          <span v-if="item.status == 1" class="moren">默认</span>
          <span class="name">{{ item.getName }}</span>
          <span class="phone">{{ item.getPhone }}</span>
          <img src="../assets/img/xiugai.png" alt="" class="xiugai" />
        </div>
        <div class="address">{{ item.address }}</div>
      </li>
    </ul>
  </div>
  <div class="bottom">
    <img src="../assets/img/add.png" alt="" />
    <span>添加收获地址</span>
  </div>
</template>

<script>
import { ref } from "vue";
export default {
  setup() {
    const list = ref([
      {
        addressId: "00001",
        getName: "张三",
        getPhone: "13626809870",
        address: "浙江省杭州市上城区1号",
        status: 1,
      },
    ]);
    return {
      list,
    };
  },
};
</script>

<style lang="less" scoped>
.top {
  display: flex;
  justify-content: center;
  padding: 12px;
  background-color: #fff;
  position: relative;
  border-bottom: 1px solid #eee;
  img {
    transform: rotate(-180deg);
    width: 20px;
    height: 25px;
    position: absolute;
    left: 14px;
  }
  span {
    font-size: 22px;
    text-align: center;
  }
}
.middle {
  background-color: #fff;
  li {
    height: 80px;
    > div:nth-of-type(1) {
      display: flex;
      padding: 10px;
      align-items: center;
      position: relative;
    }
  }
  .moren {
    width: 45px;
    height: 25px;
    background-color: #fb801d;
    color: #fff;
    border-radius: 12px;
    font-size: 14px;
    text-align: center;
    line-height: 25px;
  }
  .name {
    font-size: 14px;
    margin: 0 10px;
  }
  .phone {
    font-size: 14px;
  }
  .xiugai {
    width: 20px;
    height: 20px;
    position: absolute;
    right: 15px;
  }
  .address {
    margin-left: 12px;
    font-size: 14px;
    margin-top: 10px;
  }
}
.bottom {
  background-color: #fff;
  font-size: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  height: 50px;
  img {
    width: 22px;
    height: 22px;
    margin: 0 10px;
  }
  span {
    color: #f48a29;
  }
}
</style>
